﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MTS
{
     public  enum emStationType
    {
        emSTT_Unknown = -1,
        emSTT_Unspecified = 0,
        emSTT_IPS = 1,  // 判图站
        emSTT_SCS = 2,   // 设备控制站 SCS [今后更名DCS]
        emSTT_RCC = 3,   // 重建站
        emSTT_RCG = 4,  // 识别站
        emSTT_SMS = 5,  // 系统管理服务
        emSTT_RCS = 6,  // 
        emSTT_CSS = 7,  // 存储站
        emSTT_VUE = 8,  // 前端界面
        emSTT_OPT = 9,      //操作站，（设备控制站）
        emSTT_MTA = 10,     //维护站（）暂缺
        emSTT_PCK = 11,     //预检站 
        emSTT_CBS = 12,     //开包站
        emSTT_IPSS = 13,    //判图服务
        emSTT_IPC = 14,     //判图服务客户端
        emSTT_CFS = 15,     //开检站
        emSTT_DMS = 16,     // 设备管理服务
        emSTT_SMSC=17,      //系统管理客户端
        emSTT_DMSC=18,      //设备管理客户端
        emSTT_PISS=19,      //预检服务
        emSTT_PISC=20,      //预检客户端
    };

    //以下programType废弃
    public enum emProgramType
    {
        emPT_Unknown = -1,
        emPT_Unspecified = 0,
        emPT_IPS3D = 1,
        emPT_SCS = 2,
        emPT_SMS = 3,
        emPT_DET = 4,
        emPT_PLC = 5,
        emPT_RCC = 6,
        emPT_RCG = 7,
        emPT_RCS = 8,
        emPT_CSS = 9,
        emPT_VUE = 10,
        emPT_SCA = 11,
        emPT_OPT = 12,      //操作站
        emPT_MTA = 13,      //维护站
        emPT_PCK = 14,      //预检站
        emPT_CBS = 15,      //开包站
        emPT_IPSS = 16,     //判图服务
        emPT_IPC = 17,      //判图服务客户端
        emPT_DMS = 18,      // 设备管理服务
        emPT_CFS = 19,     // 确认站
        emPT_ALL = 100,
    };

    public enum emMatType
    {
        emMatType_Unknown = 0,
        emMatType_Iron,         // 铁
        emMatType_Aluminum,     // 铝
        emMatType_Tungsten,     // 钨
        emMatType_Plumbum,      // 铅
        emMatType_Graphite,     // 石墨
    };

    public enum emScanType
    {
        emScanType_Unknown = 0,
        emScanType_Standard = 1,
        emScanType_Quick = 2,
        emScanType_Calib = 3,
        emScanType_AutoDiag = 4,
        emScanType_ArtifDiag = 5,
        emScanType_PV_Verif = 6, //性能检验_检验
        emScanType_PV_Calib = 7, //性能检验_标定
    };

    public enum emScanDirection
    {
        //采集方向1，正向 2，反向
        emScanDirection_Forword = 1,
        emScanDirection_Backword = 2,
    };

    public enum emScanConfirm
    {
        //扫描方式0，未知，1标准扫描，2快速扫描
        emScanConfirm_Unknow = 0,
        emScanConfirm_Ok = 1,
        emScanConfirm_Reject = 2,
    };

    //设备扫描开始/停止请求
    public enum emDevScanReq
    {
        emDevScanReq_Start_Scan = 0xffff,
        emDevScanReq_Stop_Scan = 0x0000,
    };

    //PLC场景
    public enum emDevScene
    {
        emDevScene_Unknown = 0,
        emDevScene_Initialize = 1,
        emDevScene_Scan = 2,
        emDevScene_Error = 3,
        emDevScene_Maintain = 4,
        emDevScene_Standby = 5,
    };

    //设备场景状态
    public enum emDevSceneStatus
    {
        emDevSceneStatus_Unknown = 0,
        emDevSceneStatus_Waiting = 1,
        emDevSceneStatus_Runing = 2,
        emDevSceneStatus_Excp = 3,
        emDevSceneStatus_NotReady = 4,
        emDevSceneStatus_Exit = 5,
    };

    public enum emSysScene
    {
        emSysScene_Unknown = 0,
        emSysScene_Initialize = 1,
        emSysScene_SysConnect = 2,
        emSysScene_Standby = 3,
        emSysScene_Ready = 4,
        emSysScene_Scan = 5,
        emSysScene_Diagnose = 6,
        emSysScene_Maintain = 7,
        emSysScene_Calib = 8,
        emSysScene_Error = 9,
		emSysScene_Perform = 10,	// 性能检验
    };

    //系统场景状态
    public enum emSysSceneStatus
    {
        emSysSceneStatus_Unknown = 0,
        emSysSceneStatus_Waiting = 1,
        emSysSceneStatus_Runing = 2,
        emSysSceneStatus_Excp = 3,
        emSysSceneStatus_NotReady = 4,
        emSysSceneStatus_Exit = 5,
    };

    //场景工作阶段
    public enum emSceneStage
    {
        emSceneStage_Unknown = 0x000,
        emSceneStage_Initialize_Waiting = 0x011,
        emSceneStage_Scan_Ready = 0x021,
        emSceneStage_Scan_Normal = 0x022,
        emSceneStage_Scan_Quick = 0x023,
        emSceneStage_Scan_Excp = 0x024,
        emSceneStage_Calib_Ready = 0x031,
        emSceneStage_Calib_Runing = 0x032,
        emSceneStage_Calib_Excp = 0x033,
        emSceneStage_Diag_Ready = 0x041,
        emSceneStage_Diag_Runing = 0x42,
        emSceneStage_Diag_Excp = 0x43,
        emSceneStage_Maint_Ready = 0x051,
        emSceneStage_Maint_Runing = 0x52,
        emSceneStage_Maint_Excp = 0x53,

		emSceneStage_Perform_Ready = 0x061,
		emSceneStage_Perform_Runing = 0x062,
		emSceneStage_Perform_Excp = 0x063,
        emSceneStage_Test = 0x081,
        emSceneStage_Exit = 0x082,
        emSceneStage_Excp = 0x083,
    };

    //通知PLC开始/停止扫描
    public enum emDevScanRsp
    {
        emDevStartRsp_Start_Scan = 0xffff,
        emDevStartRsp_Stop_Scan = 0x0000,
    };

    public enum emCargoType
    {
        emCT_Unknown = -1,
        emCT_Q7 = 0,
        emCT_W2 = 1,
        emCT_Q6 = 2,
        emCT_AKE= 3,
    };

    public enum emEnergyType
    {
        emET_Unknown,
        emET_SingleLow, //单能 低能
        emET_SingleHigh,//单能 高能
        emET_OnlyDouble, //双能 仅高低能重回部分
        emET_FullDouble, //双能 高低能所有数据，高低能数据长度可能不相同
    };

    public enum emConclusion
    {
        emSC_Unknown = -1,
        emSC_Safe = 0,
        emSC_Suspect = 1,
        emSC_Auto = 2,          // 超时自动
        emSC_HighRisk = 3,      // 高危
        emSC_Discharged = 4,    // 放行
        emSC_Reject = 5,        // 驳回
    };

    public enum emIPS3DWorkMode
    {
        emIPS3D_Unknown = -1,       //未知
        emIPS3D_Judge = 0,          //判图模式
        emIPS3D_Watch = 1,          //开捡模式
        emIPS3D_ViewHistory = 2,    //历史模式
    };

    public enum emDeviceRequestCmd
    {
        emDRC_Unknown = 0,
        emDRC_Go = 1,
        emDRC_Stop = 2,
        emDRC_Reset = 3,
    };
    public enum emDetClctStatus
    {
        emClct_Unknown = 0,
        emClct_Bg = 1,
        emClct_Air = 2,
        emClct_Obj = 3,
    };
    public enum emDetDiagRequestCmd
    {
        emDDRC_Unknown = 0,
        emDDRC_Beam = 1,
        emDDRC_Stop = 2,
        emDDRC_Reset = 3,
        emDDRC_Clct = 4,
    };

    public enum emTrigMode
    {
        emTrig_Unknown = 0,
        emTrig_Exter = 1,
        emTrig_Inter = 2,
    };

    /*----------------------------------------2020/05/11 by tangyetao 新增----------------------------------------------*/
    // 图像清理中的删除级别
    public enum emDeleteLevel
    {
        emDeleteLevel_Unknown = 0,
        emDeleteLevel_All = 1,                      // 全部删除
        emDeleteLevel_ReserveRaw = 2,                       // 保留原始数据
        emDeleteLevel_Reservr2DAndRaw = 3,                      // 优先保留dr和原始数据
        emDeleteLevel_Reserve3DAndRaw = 4,                      // 优先保留hel和原始数据
        emDeleteLevel_Manual = 5,                       // 手动删除
    };

    //保存结果枚举
    public enum emSaveImageConsequence
    {
        emSaveImageConsequence_Unknown = -1,
        emSaveImageConsequence_Success = 0,                     //保存成功
        emSaveImageConsequence_NotExist = 1,                    //图像已被删除
        emSaveImageConsequence_Failed = 2,                      //保存失败
    };

    public enum emFileOperationType
    {
        emFileOperationType_UnKnown = 0,
        emFileOperationType_Store = 1,                      // 保存数据操作，即持久化Persist
        emFileOperationType_Load = 2,                       // 将数据发送给其他站点操作
    };

    /*----------------------------------------2020/07/16 by gaoyang2 新增----------------------------------------------*/
    //维护保养类型
    public enum emMaintainType
    {
        emMaintainType_Unknown = 0,                     // 未知
        emMaintainType_EquipmentPowerOnTime = 1,                        // 设备上电时长
        emMaintainType_EquipmentPowerOnTimes = 2,                       // 设备上电次数
        emMaintainType_XrayBeamTime = 3,                        // 加速器出束时长
        emMaintainType_RailCarRunDistances = 4,                     // 轨道车直线运行距离
        emMaintainType_RailCarRunTime = 5,                      // 轨道车直线运行时长
        emMaintainType_RailCarRotateTimes = 6,                      // 轨道车旋转次数
        emMaintainType_RailCarRollerRotateTime = 7,                     // 轨道车滚筒旋转时长
        emMaintainType_TurntableRunTime = 8,                        // 中转台运行时长
        emMaintainType_TurntableRotateTimes = 9,                        // 中转台旋转次数
        emMaintainType_ContactorActionTimes = 10,                       // 接触器动作次数
        emMaintainType_RelayActionTimes = 11,                       // 继电器动作次数
        emMaintainType_UPSBatteryTime = 12,                     // UPS电池使用时长
    };

    public enum emCalibStepMask
    {
        emCalibStepMask_Unknown = 0,                //未知
        emCalibStepMask_InitCmd = 1,                //发送初始化指令
        emCalibStepMask_Initializing = 2,           //工装初始化中
        emCalibStepMask_Initialized = 3,            //工装初始化完成
        emCalibStepMask_DevArrived = 4,             //工装到达指定位置
        emCalibStepMask_DevReady = 5,               //工装就绪
        emCalibStepMask_DevInitTimeout = 6,         //工装初始化超时
        emCalibStepMask_DevArrivedTimeout = 7,      //工装就位超时
        emCalibStepMask_ClctStartTimeout = 8,       //开始采集超时
        emCalibStepMask_ClctCompleteTimeout = 9,    //完成采集超时
        emCalibStepMask_DevExcp = 10,               //设备故障
        emCalibStepMask_DetExcp = 11,               //探测器故障
        emCalibStepMask_CalibInterrupt = 12,        //标定中断
        emCalibStepMask_BeginAim = 13,              //开始瞄准
        emCalibStepMask_FinishAim = 14,             //瞄准结束
        emCalibStepMask_StartCalib = 15,            //开始标定
        emCalibStepMask_StartBg = 16,               //开始采集本底
        emCalibStepMask_CompleteBg = 17,            //本底采集完成
        emCalibStepMask_StartAir = 18,              //开始采集空气
        emCalibStepMask_CompleteAir = 19,           //空气采集完成
        emCalibStepMask_StartGroup = 20,            //开始采集材料组合
        emCalibStepMask_CompleteGroup = 21,         //材料组合采集完成
    };

    public enum emPerformanceVerifType
    {
        emPvType_Unknown = 0,
        emPvType_Verification = 1,                  // 性能检验
        emPvType_Calibration = 2,                   // 性能标定
    };


    /// <summary>
    /// 通用消息类型
    /// </summary>
    public enum emMessageId
    {
        emMsgId_Unknown = 0,
        emMsgId_RequestConnect,
        emMsgId_SubmitStationStatus,
        emMsgId_QueryHistoryImage,
        emMsgId_SubmitConclusion,
        emMsgId_SubmitTimeoutSetting,
        emMsgId_SubmitImageOperation,
        emMsgId_VerifStationToken,
        emMsgId_VerifAuthority,
        emMsgId_QueryPackageCounts,
        emMsgId_NotifyPackageTask,
        emMsgId_NotifyHighRiskState,
        emMsgId_NotifyConfirmConclusion,
        emMsgId_RequestTotalTaskNumber,
        emMsgId_RequestManualSave,
        emMsgId_NotifyManualSaveResult,

        emMsgId_RequestSuspectResource,
        emMsgId_SubmitSuspectOperation,
        emMsgId_RequestTotalSuspectConclusion,
        emMsgId_RequestWaittingJudgeList,
        emMsgId_RequestEdiInfo,
        emMsgId_SubmitJudgeSuspectConclusion,
        emMsgId_RequestWaittingCheckList,
        emMsgId_SubmitCheckSuspectConclusion,
        emMsgId_RequestCheckTask,
        emMsgId_RequestWaittingConfirmList,
        emMsgId_SubmitConfirmSuspectConclusion,
        emMsgId_RequestConfirmTask,

        emMsgId_SubmitSuspectPicture,
        emMsgId_RequestSuspectPicture,
    };

    /// <summary>
    /// 系统报警的处理方式
    /// </summary>
    public enum emAlarmProcType
    {
        emAPT_None = 0, // 未处理
        emAPT_Ignore = 1,   // 忽视，不处理
        emAPT_AutoRelive = 2,   // 系统自动处理
        emAPT_ManualRelive = 3, // 用户手动处理
    };

    /// <summary>
    /// 查验任务类型
    /// </summary>
    public enum emInspectTaskType
    {
        emISPT_Unknown = -1,
        emISPT_Judge = 0,       //判图任务
        emISPT_Check = 1,       //开捡任务
        emISPT_Confirm = 2,     //确认任务
    };

    /// <summary>
    /// 判图模式
    /// </summary>
    public enum emInspectMode
    {
        emISPM_Unknown = 0,
        emISPM_Auto = 1,        //自动判图
        emISPM_Manual = 2,      //人工判图
    };
}
